package net.lesscoding.service;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author eleven
 * @date 2024/10/31 15:05
 * @apiNote
 */
public class UserServiceImpl implements UserService{
    private static final Map<String, String> userPwdMap = new ConcurrentHashMap<>();
    static {
        userPwdMap.put("zs", "123456");
        userPwdMap.put("ls", "123456");
        userPwdMap.put("ww", "123456");
        userPwdMap.put("zl", "123456");
        userPwdMap.put("qq", "123456");
    }
    @Override
    public boolean login(String username, String password) {
        return userPwdMap.containsKey(username) && userPwdMap.get(username).equals(password);
    }
}
